package types

type SysMenuCreateReq struct {
	Type        int    `json:"type"`
	Name        string `validate:"required,min=3" json:"name"`
	ParentId    int64  `json:"parent_id"`
	OrderNum    int    `json:"order_num"`
	Path        string `validate:"required" json:"path"`
	Component   string `json:"component"`
	QueryParams string `json:"query_params"`
	Icon        string `json:"icon"`
	IsFrame     bool   `json:"is_frame"`
	IsCache     bool   `json:"is_cache"`
	Visible     bool   `json:"visible"`
}

type SysMenuUpdateReq struct {
	SysMenuCreateReq
}

type SysMenuListResp struct {
	Id          int64             `json:"id"`
	Name        string            `json:"name"`
	Path        string            `validate:"required" json:"path"`
	Component   string            `json:"component"`
	QueryParams string            `json:"query_params"`
	Icon        string            `json:"icon"`
	IsFrame     bool              `json:"is_frame"`
	Children    []SysMenuListResp `json:"children" gorm:"-"`
}
